<!--<?php
  session_start();
  if(!$_SESSION)
  {
    ?> 
     <script type="text/javascript">
     alert("Identifiquese"); 
     window.location="../Index.php";
     </script>
    <?php
 
  }
 ?> -->
<!DOCTYPE html>
<html>
  <head>
    <title>Eliminar Usuarios</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script type="text/javascript" src="js/bootstrap-tab.js"></script>
    <script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tab.js"></script>
  </head>
  <body>
        <script src="http://code.jquery.com/jquery.js"></script>
        <script src="js/bootstrap.min.js"></script>
        
          <nav class="navbar-wrapper navbar-default navbar-fixed-top" role="navigation">
            <div class="collapse navbar-collapse navbar-ex1-collapse">
              <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                  <li><a href="ViewHome.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
                

                  <li class="active"><a href="ViewUsuarios.php"><span class="glyphicon glyphicon-user"></span> Usuarios</a></li>
       

                  <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                      <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-asterisk"></span>
                      <ul class="dropdown-menu">
                        
                      </ul>
                    </li>
                  </ul>
            </div>
          </nav>
          <!--
          Se usa la de abajo para meter todo los forms.
          !-->
          <div class="container-fluid">
            <div class="jumbotron">
                <center>
                <div class="input-group">
                <table border=1 class="table table-striped">
                <tr>
                  <td><b>C&eacute;dula</b></td>
                  <td><b>Nombre</b></td>
                  <td><b>Apellido1</b></td>
                </tr>
                <?php
                include('ModelConexion.php');

                $eliminar_cedula=$_GET['cedula'];
                $conexion = new Conexion();
                //$usuario=new Usuario();
    
                $consulta = $conexion->Consulta("
                SELECT cedula,nombre,apellido1,apellido2,direccion FROM persona 
                WHERE cedula= '$eliminar_cedula'
                ");
                $Busca= $conexion->Arreglo($consulta);

                echo "<tr class='danger'>"; 
                echo "<td valign='top'>" .( $Busca['cedula']) . "</td>"; 
                echo "<td valign='top'>" .( $Busca['nombre']) . "</td>";
                echo "<td valign='top'>" .( $Busca['apellido1']) . "</td>";
                echo "<td valign='top'>" .( $Busca['apellido2']) . "</td>";
                echo "<td valign='top'>" .( $Busca['direccion']) . "</td>"; 
                ?>  

            </div>
          <div class="alert alert-danger">
            
            <p class="text-error">Si presiona el boton 'Borrar'<br> Se eliminara por completo el dato y la persona relacionada a este usuario no podra ingresar al sistema</p>
            <form action='ControlUsuarios.php' method='POST' class="form-inline">
              <input type=="text" name="TxtEliminar" value='<?php echo $Busca['cedula']  ?>' readonly>
              <input type="submit" class="btn btn-danger" value='Borrar'><input type='hidden' value='1' name='BtnEliminar' /> 
            </form>
          </div>
         
  
                </center>
  

  
            </div>
          </div>
 

          <footer>
            <div class="container">
              <div class="row">
                <div class="col-md-10">&copy; 2013 | Universidad Nacional | Sede Regional Chrotega | Campus Nicoya</div>
              </div>
            </div>
          </footer>
      
  
  
  </body>
</html>